package com.systop.dxjj.modules.collectinfo.controller;



import com.systop.dxjj.common.utils.R;
import com.systop.dxjj.modules.collectinfo.service.CollectinfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api("收藏管理模块")
public class CollectinfoController {

    @Autowired
    private CollectinfoService collectinfoService;

    @GetMapping("/showCollectinfo")
    @ApiOperation(value = "展示收藏信息",notes = "收藏信息")
    public R showCollectinfo(){
        return collectinfoService.showCollectinfo();
    }

    @GetMapping("/findCollectinfoById/{id}")
    @ApiOperation(value = "根据id查询",notes = "收藏信息")
    public R findCollectinfoById(@PathVariable Integer id){

        return collectinfoService.findCollectinfoById(id);
    }


    @GetMapping("/findCollectinfoByName/{name}")
    @ApiOperation(value = "根据姓名查询",notes = "收藏信息")
    public R findCollectinfoById(@PathVariable String name){
        return collectinfoService.findCollectinfoByName(name);
    }

}
